<template>
    <div>
      <table class="_table">
        <tr class="_tr">
          <td>姓名</td>
          <td>年龄</td>
          <td>邮箱</td>
        </tr>
        <tr v-for="item in books ">
          <td>{{item.bookAuthor}}</td>
          <td>{{item.bookName}}</td>
          <td>{{item.price}}</td>
        </tr>
      </table>

    </div>
</template>

<script>
    export default {
        name: "UserList",
      data(){
          return{
            books:[
              {
                bookName:'java',
                bookAuthor:'小黑',
                price:'33'
              }
            ]
          }

      },
      created() {
          const _this =this
          axios.get('http://localhost:8181/book/findAll').then(function(resp){
         _this.books=resp.data
          })
      }
    }
</script>

<style scoped>
table,td{
  border: 1px solid silver;
}


</style>
